﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
public class Tank : MonoBehaviour
{
    //声明一个事件
    public UnityEvent destroyEven=null;  //销毁事件
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }

    private void OnDestroy()
    {
        //事件调用
        if(destroyEven!=null)
        {
            destroyEven.Invoke();
        }
    }



}
